package com.jsoft.service.impl;

import com.jsoft.dao.MyVoucherDao;
import com.jsoft.dao.impl.MyVoucherDaoImpl;
import com.jsoft.service.MyVoucherService;
import org.junit.Test;

import java.util.List;

/**
 * @author zhangxuehan
 * @email 2302630156@qq.com
 * @date 2023/2/20
 */
public class MyVoucherServiceImpl implements MyVoucherService {
    private MyVoucherDao myVoucherDao = new MyVoucherDaoImpl();
    /**
     * 查询所有凭证
     * @return
     * @throws Exception
     */
    @Override
    public List listVoucher(String id,int start,int page,String sqlVoucher) throws Exception {
        return myVoucherDao.listAll(id,start,page,sqlVoucher);
    }

    /**
     * 总记录数
     * @return
     * @throws Exception
     */
    @Override
    public long countVoucher(String id,String sqlVoucher) throws Exception {
        return myVoucherDao.count(id,sqlVoucher);
    }


    @Override
    public List findVoucherId(int id) throws Exception {
        return myVoucherDao.findId(id);
    }

    @Override
    public List getIdAndStatus(int id) throws Exception {
        return myVoucherDao.findIdAndStatus(id);
    }



}
